<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
        <div id="msg"></div>
        <textarea id="ta1" cols="40" rows="10">aa</textarea>
        <script type="text/javascript">
            var ta1 = document.getElementById("ta1");
            var div = document.getElementById("msg");
            ta1.onkeyup = function(event) {
                var e = window.event || event;
                var keycode = e.keycode || e.which;
                div.innerHTML += keycode + " ";
            }
        </script>
    </body>
</html>
